require.config({
  paths : {
    "jquery" : "../3rd/jquery-1.11.1.min",
    "bootstrap" : "../../bootstrap/js/bootstrap.min",
    "cookie" : "../common/cookie"
  },
  shim : {
    "bootstrap" : {
      deps : [ 'jquery' ],
      exports : "bootstrap"
    }
  }
});

require([ 'jquery', 'bootstrap', 'cookie', "split-nav" ], function($, bootstrap, cookie, splitNav) {
  $(document).ready(function() {
    load();
    $("#sign").click(unload);
  });

  function load() {
    var $uid = $("input#uid");
    if (!$uid.val() || $uid.val() == '') {
      var cookieUid = cookie("uid");
      $("input#uid").val(cookieUid);
    }
  }

  function unload() {
    var $uid = $("input#uid");
    var cookieUid = cookie("uid");
    if ($uid.val() != cookieUid) {
      cookie("uid", $("input#uid").val(), {
        expires : 30
      });
    }
  }
})